#include <bits/stdc++.h>
using namespace std;
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
using ll = long long;
void solve()
{
    ll n, k;
    cin >> n >> k;
    vector<ll> h(n);
    for (ll i = 0; i < n; i++)
    {
        cin >> h[i];
    }
    ll now = h[k - 1], pos = 0;
    sort(h.begin(), h.end());
    for (ll i = 0; i < n; i++)
    {
        if (h[i] == now)
            pos = i;
    }
    if (pos + 1 == n)
    {
        yes;
        return;
    }
    ll water_high = 0;
    for (ll i = pos + 1; i < n; i++)
    {
        //cout << h[i] << ":";
        ll hh = h[i] - now;
        water_high += hh;
        if (water_high > now)
        {
            no;
            return;
        }
        now = h[i];
    }
    yes;
}
int main()
{
    int t = 1;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
